#ifndef _MIXP_SKT_CLIENT_H
#define _MIXP_SKT_CLIENT_H

#include "mixedprocess.h"
#include "core/protocol/mixp_packet.h"
#include "mixp_skt_server.h"

#include "gear-lib/libgevent.h"
#include "gear-lib/libhash.h"
#include "gear-lib/libskt.h"

typedef struct mixp_skt_client
{
    uint32_t sessionid;
    int fd;
    skt_addr_t *addr;
    pid_t wk_pid;
    struct gevent *ev;
    mixp_packet_t *req;
    mixp_packet_t *ack;
    mixp_skt_server_t *server;

    char info[64];
} mixp_skt_client_t;

#ifdef __cplusplus
extern "C"
{
#endif

    mixp_skt_client_t *mixp_skt_client_new(mixp_skt_server_t *, int, uint32_t, uint16_t);
    void mixp_skt_client_free(mixp_skt_client_t *);

    void mixp_skt_client_info(mixp_skt_client_t *);
    int mixp_skt_client_ack(mixp_skt_client_t *, void *, size_t);

#ifdef __cplusplus
};
#endif
#endif